<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:insert="~{include :: header('修改翻译词典')}"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-translation-edit" th:object="${translation}">
        <input id="id" name="id" th:field="*{id}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label is-required" for="en">EN：</label>
            <div class="col-sm-9">
                <div class="input-group">
                    <input id="en" name="en" placeholder="英文" required th:field="*{en}" type="text">
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required" for="cn">ZH：</label>
            <div class="col-sm-9">
                <div class="input-group">
                    <input id="cn" name="cn" placeholder="中文"
                           required th:field="*{cn}" type="text">
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">isPrime：</label>
            <div class="col-sm-8">
                <div class="radio-box">
                    <label for="isPrime">
                        <input id="isPrime" name="isPrime" th:checked="*{isPrime}"
                               type="radio" value="true">
                        True</label>
                </div>
                <div class="radio-box">
                    <label for="notPrime">
                        <input id="notPrime" name="isPrime"
                               type="radio" value="false" th:checked="*{!isPrime}">
                        False</label>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">isSet：</label>
            <div class="col-sm-8">
                <div class="radio-box">
                    <label for="isSet">
                        <input id="isSet" name="isSet"
                               th:checked="*{isSet}" type="radio" value="true">
                        True</label>
                </div>
                <div class="radio-box">
                    <label for="notSet">
                        <input checked id="notSet"
                               name="isSet" type="radio" value="false" th:checked="*{!isSet}">
                        False</label>
                </div>
            </div>
        </div>
    </form>
</div>
<th:block th:insert="~{include :: footer}"/>
<script type="text/javascript">
    const prefix = ctx + "data/warframe/translation";

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/save", $('#form-translation-edit').serialize());
        }
    }
</script>
</body>
</html>
